import axios from "axios";
import { useCounterStore } from "@/store/index";

axios.interceptors.request.use((config)=>{
    const store = useCounterStore();
    config.headers.Authorization = store.userInfo.token
    return config
})

axios.interceptors.response.use((data)=>{
    return data.data
})

export default axios